#include "netcli.hpp"
#include <arpa/inet.h>
#include <cstring>
#include <iostream>
#include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>

#define BUFFER_SIZE 1024

int main()
{
    char buffer[BUFFER_SIZE] = "hello server, i am client!";
    char ip[16] = "127.0.0.1";

    netcli cli(ip, 8080);
    cli.send(buffer, strlen(buffer));
    cli.recv(buffer, BUFFER_SIZE);
    std::cout << "Message from server: " << buffer << std::endl;

    return 0;
}
